/**
 * author:Administrator
 * date:2016/2/24
 * desc:TODO
 */

'use strict';

var RepoImpl = require('../../../infrastructure/persist').ManagerRepoImpl;

class ManagerRepo {

  constructor(Manager) {
    this.Manager = Manager;
  }

  /**
   *
   * @param id
   * @param t transaction
   * @returns {*}
   */
  static * find(id, t) {
    //console.log('ManagerRepo::find, id=', id);
    return yield RepoImpl.find(id, t);
  }

  /**
   * return pojo list
   * @param uId
   * @returns {*}
   */
  static * findByUid(uId) {
    return yield RepoImpl.findByUid(uId);
  }

  static * store(manager) {
    yield RepoImpl.store(manager);
  }
}

module.exports = ManagerRepo;
